package com.middlegroup.pay.service;


import com.middlegroup.common.model.PayRequest;
import com.middlegroup.common.model.RefundRequestDto;
import com.middlegroup.common.model.TransResult;
import com.middlegroup.pay.dto.AliReturnQueryOrderResponse;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author
 * @since 2019-08-07
 */
public interface AlipayService {
     /**
      * 支付宝创建订单
      * */
     public TransResult createAlipay(PayRequest request);

     /**
      * 支付宝查询订单
      * */
     public AliReturnQueryOrderResponse AlipayQuery(String merchantBillNo, String billNo);

     /**
      * 支付宝退款
      * */
     public TransResult refundAlipay(RefundRequestDto refundRequest, TransResult transResult);

     /**
      * 支付宝退款查询
      * */
     public AliReturnQueryOrderResponse refundQueryAlipay(String outRequestNo);

     /**
      * 支付宝通知
      * @param request
      * @return
      */
     public void aliPayH5Notify(HttpServletRequest request) throws Exception;
}
